package main

import (
	"bufio"
	"fmt"
	"golang/tffjson/bao"
	"os"
	"time"

	"git.yunpro.cn/mediapro/offline-ssp-review/strtime"

	"github.com/pquerna/ffjson/ffjson"
)

func main() {
	f, _ := os.Open("./log/aa")
	scanner := bufio.NewScanner(f)
	for scanner.Scan() {
		m, e := simpleDeal(scanner.Bytes())
		if e != nil {
			panic("!!!!!!!!!!!")
		}
		fmt.Println(m.Gaga.Gaga, m.Type)
	}
	datehour := strtime.Strftime("%Y%m%d%H", time.Now())
	fmt.Println(datehour)
}
func simpleDeal(msg []byte) (*bao.MMM, error) {
	var m bao.MMM
	return &m, ffjson.UnmarshalFast(msg, &m)
}
